<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>VieNow</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            color: white;
        }
        .container {
            text-align: center;
            background: rgba(255, 255, 255, 0.1);
            padding: 40px;
            border-radius: 20px;
            backdrop-filter: blur(10px);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            max-width: 500px;
            width: 90%;
        }
        .logo {
            font-size: 48px;
            margin-bottom: 20px;
        }
        h1 {
            font-size: 24px;
            margin-bottom: 20px;
            font-weight: 300;
        }
        .content-preview {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 20px;
            margin: 20px 0;
            text-align: left;
        }
        .content-cover {
            width: 100%;
            max-width: 200px;
            height: 120px;
            object-fit: cover;
            border-radius: 10px;
            margin: 0 auto 15px;
            display: block;
        }
        .content-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 8px;
            color: #ffd700;
        }
        .chapter-title {
            font-size: 16px;
            margin-bottom: 8px;
            opacity: 0.9;
        }
        .content-summary {
            font-size: 14px;
            opacity: 0.8;
            line-height: 1.4;
            margin-bottom: 8px;
        }
        .content-instructor {
            font-size: 12px;
            opacity: 0.7;
        }
        .loading {
            display: inline-block;
            width: 40px;
            height: 40px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 1s ease-in-out infinite;
            margin: 20px 0;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .countdown {
            font-size: 18px;
            margin: 20px 0;
            color: #ffd700;
        }
        .button {
            display: inline-block;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            padding: 12px 30px;
            border-radius: 25px;
            text-decoration: none;
            border: 2px solid rgba(255, 255, 255, 0.3);
            transition: all 0.3s ease;
            margin: 10px;
            cursor: pointer;
        }
        .button:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }
        .info {
            margin-top: 30px;
            font-size: 14px;
            opacity: 0.8;
        }
        .url {
            word-break: break-all;
            background: rgba(0, 0, 0, 0.2);
            padding: 10px;
            border-radius: 8px;
            margin: 10px 0;
            font-family: monospace;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="logo">🎬VieNow</div>
        
        <!-- 内容预览 -->
        <div class="content-preview" id="contentPreview" style="display: none;">
            <img src="{{contentCoverUrl}}" alt="{{contentTitle}}" class="content-cover" id="contentCover">
            <div class="content-title" id="contentTitle">{{contentTitle}}</div>
            <div class="content-summary" id="contentSummary">{{contentSummary}}</div>
            <div class="content-instructor" id="contentInstructor">导演：{{contentInstructor}}</div>
        </div>
        
     
        
        <a href="{{targetUrl}}" class="button" id="jumpButton">立即跳转</a>
        <a href="javascript:history.back()" class="button">返回上页</a>
        
        <div class="info">
            <p>如果页面没有自动跳转，请点击"立即跳转"按钮</p>
            <p>分享内容：{{shareType}} - {{targetId}}</p>
        </div>
    </div>

    <script>
        const targetUrl = "{{targetUrl}}";
        const jumpButton = document.getElementById("jumpButton");
        const contentPreview = document.getElementById("contentPreview");
        
        // 检查是否有内容信息，如果有则显示预览
        const contentTitle = "{{contentTitle}}";
        if (contentTitle && contentTitle.trim() !== '') {
            contentPreview.style.display = 'block';
        }
        
        // 点击立即跳转
        jumpButton.addEventListener("click", () => {
            // 移除clearInterval(timer)这行，因为timer变量没有定义
            window.location.href = targetUrl;
        });
        
        // 页面加载完成后开始倒计时
        window.addEventListener("load", () => {
            console.log("重定向页面已加载，目标URL:", targetUrl);
        });
    </script>
</body>
</html>
